<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.0/animate.min.css"
        rel="stylesheet">
    <script src="https://unpkg.com/vue@next"></script>
    <style>
        .box {
            text-align: center;
            width: 100px;
            height: 100px;
            line-height: 100px;
        }

        @keyframes leftToRight {
            0% {
                transform: translateX(-100px);
            }

            50% {
                transform: translateX(-50px);
            }

            100% {
                transform: translateX(0);
            }
        }

        @keyframes shake {
            0% {
                transform: translateX(100px);
            }

            50% {
                transform: translateX(-50px);
            }

            100% {
                transform: translateX(50px);
            }
        }

        .hello {
            animation: leftToRight 2s;
        }

        .bye {
            animation: shake 2s;
        }
    </style>
</head>

<body>
    <div id="app"></div>
</body>
<script>
    let vm = {
        data () {
            return {
                show: false,
            }
        },
        template: `
                    <transition
                        name="custom-classes-transition"
                        enter-active-class="animate__animated animate__tada"
                        leave-active-class="animate__animated animate__bounceOutRight"
                    >
                        <div v-show="show"> GalaxySa </div>
                    </transition>
                    <button @click="show=!show">切换</button>
                    `,
        methods: {
        }
    }
    Vue.createApp(vm).mount('#app')
</script>

</html>